window.userName = $('._buryDot-userEmail')[0] ? $('._buryDot-userEmail').text() : '游客';
$(function() {
	var _searchKey = $('._searchKey').text()
	var _resoultCount = $('._resoultCount').text()
	if(!myCookie.getCookie('searchKey')) {
		document.cookie = 'searchKey=' + _searchKey
		//TODO 埋点 1.3
		zhuge.track('搜索', {
			'用户':userName,
			'关键字': _searchKey,
			'搜索结果数': _resoultCount
		})
	} else {
		if(myCookie.getCookie('searchKey') == _searchKey) {
			//		console.log('已经有了')
		} else {
			//		console.log('这个可以有')
			document.cookie = 'searchKey=' + _searchKey
			zhuge.track('搜索', {
				'关键字': _searchKey,
				'搜索结果数': _resoultCount
			})
		}
	}

	//埋点--查看详情
	$('._searchData').click(function() {
			var serviceName = $('._serviceName').attr('alt');
			//var factoryName = $(this).find('.qybt ').text();
			var minPrice = $('._minPrice');
			zhuge.track('查看服务详情', {
				'用户':userName,				
				'服务名称': serviceName,
				'价格':minPrice
				//'服务商': factoryName
			})
		})
		//意见反馈--弹出客服弹窗
	 $(document).on('click','._call', function() {
		if($('#MEIQIA-BTN-HOLDER')) {
			$('#MEIQIA-BTN-HOLDER #MEIQIA-BTN-PICTURE').trigger('click')
		}
	})
})